Verification of Programs with Inspector Methods

نویسندگان

  • Bart Jacobs
  • Frank Piessens
چکیده

Most classes in an object-oriented program provide access to an object’s state through methods, so that client code does not depend on and cannot interfere with the object’s internal representation composed of fields and internal component objects. Methods used for this purpose are sometimes called inspector methods. In order to extend the benefits of inspector methods to specifications, the method contracts of non-inspector methods may be expressed using inspector methods, hence providing support for state abstraction in specifications. In this paper, we propose an approach to the verification of programs that use inspector methods in method contracts and object invariants. Inspector methods may have parameters, and they may depend on the state of objects passed as arguments. Our approach builds on the Boogie methodology for object invariants and ownership. Performing state abstraction in a programming language that allows aliasing through object references poses a framing problem. Specifically, client code needs to be able to tell whether modifying a given object or calling a given method may affect the value of a given inspector method call. We solve this by modeling inspector methods as functions that take as arguments only those parts of the heap on which they depend. Thanks to a novel logical encoding of the heap, we can do this without breaking information hiding, even in cases where inspector methods depend on internal component objects. The core of our approach has been implemented in a custom build of the Spec# program verifier.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Inspector Methods for State Abstraction

Most classes in an object-oriented program provide access to an object’s state through methods, so that client code does not depend on and cannot interfere with the object’s internal representation composed of fields and internal component objects. In order to extend the benefits of methods to specifications, method contracts may themselves be expressed using methods, hence providing support fo...

متن کامل

Introduction of a Reliable Software for the Calculation of the Gamma Index

Introduction: The gamma index is a known parameter for radiotherapy dose verification. Many free and commercial programs have been written for the calculation of this index. However, the verification of the results has been overlooked in many of the programs. The present study tested the validity of three gamma index calculator programs. Material and ...

متن کامل

Analyzing MPI programs with Intel® VTuneTM Amplifier XE and Intel® Inspector XE tools

This document is a supplement to the Intel® Cluster Studio XE and Intel® Parallel Studio XE documentation. It describes how to use the Intel® VTuneTM Amplifier XE and Intel® Inspector XE tools for analyzing MPI workloads.

متن کامل

Inspector Leadership with Incomplete Information

Inspection problems arise when an inspector has to decide whether an inspectee has behaved legally, i.e., according to a formal agreement. For such a decision the inspector uses a well-defined procedure which is based on observations of random variables and which may or may not be announced to the inspectee. Whereas in the latter case (no announcement) in equilibrium the inspectee will behave i...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006